<template>
  <div class="content">
    <div class="cloud-header">
      <h2>商户管理</h2>
    </div>
    <div class="cloud-body">
      <div class="cloud-subset-title">
        <div class="cloud-subset-action">
          <Button color="primary" v-popup.newMulti action="initialize">+新增商户</Button>
        </div>
        <p class="cloud-subset-tips">多商户管理系统,用户后台直接向商户展示，以展示多商户的功能，此功能需要在配置文件打开<br></p>
      </div>
      <div class="cloud-rules-body">
        <Table :datas="datas">
          <TableItem title="序号" prop="$serial"></TableItem>
          <TableItem title="商户标题" prop="name"></TableItem>
          <TableItem title="商户名" prop="title" align="center"></TableItem>
          <TableItem title="商户标识符" prop="uuid"></TableItem>
          <div slot="empty">自定义提醒：暂时无数据</div>
        </Table>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
export default {
  data() {
    return {
      datas: []
    };
  },
  /**
   * 页面加载执行
   * @return {[type]} [description]
   */
  mounted() {
    this.initialize();
  },
  methods: {
    /**
     * 初始化数据
     * @return {[type]} [description]
     */
    initialize() {
      this.$cloud.multi().all().then(data => {
        this.datas = data;
      });
    }
  }
};

</script>
<style lang="less" scoped="true">
.cloud-rules-body {
  margin: 0 15px;
}

</style>
